home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cenvid
/
errlev.bat
< prev
next >
Wrap
DOS Batch File
|
1994-10-20
|
961b
|
19 lines
@echo off
REM ************************************************************************
REM *** ERRLEV.BAT - Call a program, passing up to 8 parameters, and ***
REM *** ver.2 set the ERRLEV environment variable from the return ***
REM *** Code of that program. Also return with ERRORLEVEL ***
REM *** set as if the program was run directly from the ***
REM *** command prompt or from a batch file. ***
REM ************************************************************************
if not "%1" == "" GOTO RUN_ERRLEV
ECHO ERRLEV - Call a program, passing up to 8 paramters. Sets ERRLEV environment
ECHO variable to the value returned. Also set ERRORLEVEL for batch file.
ECHO Example: ERRLEV CHKDSK C:
:RUN_ERRLEV
REM CEnviD return(ERRLEV = spawn(P_WAIT,`%1 %2 %3 %4 %5 %6 %7 %8 %9`));
CEnviD return(ERRLEV = spawn(P_SWAP,`%1 %2 %3 %4 %5 %6 %7 %8 %9`));